package com.e1xp.deport_management_system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.e1xp.deport_management_system.entity.Order;
import com.e1xp.deport_management_system.entity.OrderProduct;
import com.e1xp.deport_management_system.exception.CustomException;
import com.e1xp.deport_management_system.utils.AddOrderProductWrapper;
import com.e1xp.deport_management_system.utils.PickWrapper;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author E1xP
 * @since 2021-04-09
 */
public interface IOrderService extends IService<Order> {

    long getUnFinishCount(long instanceId);

    List<Order> getRecent(long instanceId, int count);

    List<Order> getList(long instanceId);

    void add(long instanceId, Order order, List<OrderProduct> orderProductList) throws CustomException;

    Order get(long instanceId, long orderId);

    List<Map<String, String>> getOrderProductList(long instanceId, long orderId);

    void pick(long instanceId, long orderId, long userId) throws CustomException;

    void updateOrder(long instanceId, Order order) throws CustomException;

    List<Order> getPickingOrder(long instanceId, long id);

    List<Map<String, String>> toPickProductList(long orderId);

    List<Order> getPendingOrderList(long instanceId);

    Map<String, Object> getPickingData(long instanceId, long orderId);

    List<Order> getWaitOrder(long instanceId);

    void sendGoods(long instanceId, long orderId) throws CustomException;

    void delete(long instanceId, long orderId) throws CustomException;

    void pickProduct(long instanceId, Long userId, PickWrapper pickWrapper) throws CustomException;

    OrderProduct getOrderProduct(long instanceId, long orderProductId);

    void updateOrderProduct(long instanceId, OrderProduct orderProduct) throws CustomException;

    void addOrderProduct(long instanceId, AddOrderProductWrapper addOrderProductWrapper) throws CustomException;

    void deleteOrderProduct(long instanceId, long orderProductId) throws CustomException;
}
